using RpgXna.Model.GameManager;
using RpgXna.Model.Menu.MenuBehaviors;

namespace RpgXna.Model.Interfaces.MainMenu.MenuBehaviors
{
    internal class ExitGameBehavior : IMenuBehavior
    {
        private readonly GameStateManager _stateManager;

        public ExitGameBehavior(GameStateManager stateManager)
        {
            _stateManager = stateManager;
        }

        #region IMenuBehavior Members

        public void Execute()
        {
            if (_stateManager != null) _stateManager.State = GameStates.ExitRequested;
        }

        #endregion IMenuBehavior Members
    }
}